package 蓝桥真题;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class 迷宫 {
	   static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
       final static int N=60;
       static char g[][]=new char[N][N],tr[][]=new char[N][N];
       static Pair q[]=new Pair[N*N]; 
       static class Pair{
    	      int x,y;
    	      Pair(int x,int y){
    	    	  this.x=x;
    	    	  this.y=y;
    	      }
       }
       public static void main(String[]args)throws Exception{
    	      for(int i=0;i<30;i++){
    	    	  br.read(g[i],0,50);
    	    	  br.readLine();
    	      }
    	      int hh=0,tt=-1,dix[]={1,0,0,-1},diy[]={0,-1,1,0};
    	      char[]ctr={'D','L','R','U'};
    	      q[++tt]=new Pair(0,0);
    	      while(tt>=hh){
    	    	    Pair t=q[hh++];
    	    	    for(int i=0;i<4;i++){
    	    	    	int x=t.x+dix[i],y=t.y+diy[i];
    	    	    	if(x>=0&&x<30&&y>=0&&y<50&&g[x][y]=='0'&&tr[x][y]=='\u0000'){
    	    	    		tr[x][y]=ctr[i];
    	    	    		q[++tt]=new Pair(x,y);
    	    	    	}
    	    	    }
    	      }
    	      String res="";
    	      int x=29,y=49;
    	      while(x!=0||y!=0){
    	    	    char t=tr[x][y];
    	    	    res=t+res;
    	    	    if(t=='D'){
    	    	    	x-=1;
    	    	    }else if(t=='L'){
    	    	    	y+=1;
    	    	    }else if(t=='R'){
    	    	    	y-=1;
    	    	    }else{
    	    	    	x+=1;
    	    	    }
    	      }
    	      System.out.print(res);
       }
}
